//专门用来生成用户临时id的函数
import { nanoid } from "nanoid";
export default function getUserTempId() {
  let localTempId = localStorage.getItem("tempId");

  if (!localTempId) {
    localTempId = nanoid();
    localStorage.setItem("tempId", localTempId);
  }

  return localTempId;
}
